package com.financing.platform.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.ISMSADDao;
import com.financing.platform.dto.SMSADDTO;
import com.financing.platform.util.SqlName;

/**
 * 
 * @ClassName: SMSADDaoImpl
 * @Description: 短信广告接口 
 * @author  qiye
 * @date 2015年4月7日 下午3:55:17
 *
 */
@Repository("sMSADDaoImpl")
public class SMSADDaoImpl extends BaseDaoImpl implements ISMSADDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<SMSADDTO> listSmsAd(SMSADDTO smsAdDTO) throws Exception {
		return this.sqlMapClient.queryForList(SqlName.querySMSADList,smsAdDTO);
	}

	@Override
	public int addSmsAd(SMSADDTO smsAdDTO) throws Exception {
		return (Integer) this.sqlMapClient.insert(SqlName.addSMSAD, smsAdDTO);
	}

	@Override
	public int deleteSmsAd(Integer id) throws Exception {
		return this.sqlMapClient.update(SqlName.deleteSMSAD, id);
	}

	@Override
	public SMSADDTO querySMSAdInfo(SMSADDTO smsAdDTO) throws Exception {
		return (SMSADDTO) this.sqlMapClient.queryForObject(SqlName.querySMSADInfo,smsAdDTO);
	}
}

	